package com.xc.domain.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum UserStatus {
    NORMAL(1, "正常"),
    FREEZE(2, "冻结");

    @EnumValue // 标记数据库存的值是code，不是枚举
    private final Integer code;
    @JsonValue // 标记返回前端的值是type，不是枚举
    private final String type;

    UserStatus(Integer code, String type) {
        this.code = code;
        this.type = type;
    }
}
